1. Field of the Invention
The invention relates to a method of controlling a flexible disk controller, and more particularly to a method of formatting a flexible disk by a flexible disk controller for computers.
2. Description of Related Art
The conventional formatting system of a flexible disk will be described with reference to FIG. 1. A flexible disk or a floppy disk comprises a plurality of tracks, each of which further comprises a plurality of sectors and is terminated by both a preamble and a postamble. Each of the sectors is allocated with address and it comprises an identification field (an ID field) and a data field, both of which are separated from each other through a gap at which a gap data is written. Each of the identification field (ID field) further comprises a syno, an identification address mark (an ID address mark), an identification, and a cyclic redundancy check (a CRC). Each of the data field comprises a sync, a data address mark (an ID address mark), a data, and a cyclic redundancy check (a CRC).
The conventional formatting operation of the flexible disk by the flexible disk controller and a subsequent operation of a data storage into the formatted flexible disk will subsequently be described with reference to FIG. 2. With respect to the flexible disk format, the flexible disk controller executes a write operation of identification information into all tracks of a flexible disk thereby a format of the flexible disk is conducted, after which thereafter the flexible disk controller initiates a write operation entering data into the formatted flexible disk.
The write operation of the identification information for formatting a flexible disk is executed as follows. A flexible disk controller receives, from a host system, an instruction of a write operation of identification information including parameters into a flexible disk and then confirms a status of a flexible disk drive. Thereafter, the flexible disk controller receives index pulse signals from the flexible disk drive and then the flexible disk controller initiates sequential formatting operations of every tracks of the flexible disk. In the format operation of the tracks, after receipt of an index pulse signal, the flexible disk controller initiates a format operation of a track whereby, a preamble format operation is executed previous to all other format operations. After the preamble format operation, the flexible disk controller executes sequential format operations of the plural sectors in the track, terminated by a postamble format operation.
In a format operation of each sector in the track, the flexible disk controller executes a format operation of an identification field (ID field) and a subsequent format operation of a gap data. The flexible disk controller subsequently executes a format operation of the data field, again followed by a gap data format operation.
An identification field format operation of each sector is executed as follows. A flexible disk controller first generates sync data and then initiates a write operation of sync data into an identification field of a sector. After that, the flexible disk controller generates the identification address mark for a subsequent write operation thereof into the identification field of the sector. The flexible disk controller then causes a request for a transfer of an identification information and then transmits the request to a host system. The host system receives the request and then transfers the identification information to the flexible disk controller. The flexible disk controller receives the identification information from the host system and then executes a write operation of the identification information into the identification field. After that, the flexible disk controller generates a cyclic redundancy check information for a subsequent write operation thereof into the identification field. This is how the format operation of the identification field of the sector is completed.
A gap data format operation follows the above identification field format operation. The data field format operation is subsequently executed by a flexible disk controller. As described above, the flexible disk controller has received the parameters accompanying the identification information from the host system. The parameters contain information about data patterns. The flexible disk controller executes a continuous write operation of data pattern into a data field. The format operation of the sector in the track is terminated by a gap data write operation into the sector. This is how the format of the sector in the track is completed.
After the above format operation of one sector, format operations of remaining sectors in the track are sequentially executed in the same manner, until format operations of all sectors in the single track are completed.
After the format operations of all sectors in the track, the flexible disk controller executes a format operation of a postamble as a final format operation of the track, resulting in a completion of the format operation of the track. After that, the flexible disk controller transmits information about a result status of the track to the host system
Subsequently, sequential format operations of remaining tracks are executed in the same manner, until format operations of all tracks are completed. This is how the format of a single flexible disk is completed.
As described above, a flexible disk format operation is executed prior to a write operation of data into a formatted flexible disk. After the completion of the format operation of the flexible disk, the flexible disk controller receives an instruction of write operations of data and then locates a sector, into which the data is written, in the flexible disk. The flexible disk controller finds the sector to store the data and then supplies the host system with a request for transmission of the data. The host system then transmits the data to the flexible disk controller upon the data transmission request. The flexible disk controller receives the data from the host system for a subsequent write operation of the data into the located sector, concretely in the data field of the located sector. The above mentioned write operation of data are executed in sequence for every sectors in the flexible disk.
The write operation of data into the data fields of the sectors in the flexible disk will be described with reference to FIG. 1.
The flexible disk controller receives a write operation instruction of data accompanied with parameters from the host system and then confirms a status of the flexible disk drive. The parameters accompanied to the write operation instruction specifies an identification field of a sector including a data field into which the data will be written. Namely, the flexible disk controller becomes a read enable state and then initiates a retrieval of a data field which is specified by the parameters until the corresponding identification field to the parameter is found. After the confirmation of the corresponding identification field, the flexible disk controller becomes a write operation state of data into a data field in the specified sector.
The write operation of data into a specified sector by the parameter is executed as follows. The flexible disk controller firstly generates sync data and then initiates a write operation of sync data into the data field of the specified sector. After that, the flexible disk controller generates the data address mark for a subsequent write operation thereof into the data field of the specified sector. The flexible disk controller then causes a request for a transfer of data to be stored into the specified data field and then transfers the request to the host system. The host system receives the request and then transfers the data to be stored into the specified data field to the flexible disk controller. The flexible disk controller receives a sequential transmission of the data from the host system and then executes a write operation of the data into the specified data field. After that, the flexible disk controller generates the cyclic redundancy check information for a subsequent write operation thereof into the specified data field. Finally, the flexible disk controller transmits information about a result status to the host system. That is how the write operation of the data into the specified data field of the sector is completed.
The above data write operation steps are continued for each sector in the flexible disk so that the write operation of data into the flexible disk is completed.
Although details of the above format operation and the subsequent data write operation are illustrated in FIGS. 3A to 4B, detailed descriptions thereof will be omitted because they can easily be understood from the drawings.
As described above, in the prior art, the format operation of and the subsequent data write operation into the flexible disk are executed. Such format operation and subsequent data write operation contain the following disadvantages.
One of the disadvantages is that the separate formatting and data writing operations require twice as much time than a combined formatting and data writing operation, because the data writing operation is executed after the flexible disk formatting operation. Namely, two times of the operations are sequentially executed according to two instructions, the first is the write operation of the identification information into the identification fields of the flexible disk, and the second is the write operation of data into the flexible disk. When the flexible disk drive has a rotation rate of 300 rpm, 80 cylinders, 5 msec of a shift time between tracks and a format operation of a single track requires 200 msec, format operations requires at least 64.8 sec., even without considering the time needed for interpreting instructions by the flexible disk controller.
Another disadvantage is the complexity of controlling the flexible disk controller by the host system due to both the instructions needed for the format operation and the data write operation. Since the transfer of several ten bytes from the host system to the flexible disk controller are required for only instruction and subsequent parameters from the host system, except for the identification informations and the data.
To eliminate these disadvantages, the claimed invention provide a novel method of controlling a flexible disk controller to execute a flexible disk format operation and a data write operation.